/* -*- mode: c++; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*- */

#ifndef _DEBUGGER_H_
#define _DEBUGGER_H_

#include <string>

enum {
    DBG_TT_CUR_THREAD,

    DBG_TT_ALL_THREAD,
};

extern int dbg_get_bt(std::string& result, int thread_type);

typedef void (* dbg_fatal_func_t) (void);

extern int dbg_handle_fatal_signals(dbg_fatal_func_t func);

//#define USE_DEBUGP 1

#if USE_DEBUGP
  #define DEBUGP(args) printf args
#else
  #define DEBUGP(args) ((void) 0)
#endif

#endif /* _DEBUGGER_H_ */
